package com.xdf.ecommerce.controller;

import com.xdf.ecommerce.account.AddressInfo;
import com.xdf.ecommerce.service.IAddressService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author chanchaw
 * @create 2025-10-25 19:03
 */
@ApiModel(description = "用户收货地址信息")
@Slf4j
@RequiredArgsConstructor
@CrossOrigin
@RestController
@RequestMapping("/address")
public class AddressController {
    private final IAddressService service;

    @ApiOperation(value = "查询", notes = "查询当前登录用户的收货地址", httpMethod = "POST")
    @PostMapping("/addressInfo")
    public AddressInfo getCurrentAddressInfo(){
        return service.getCurrentAddressInfo();
    }

}
